package cn.maxhou.sl2.service.impl;

import cn.maxhou.sl1.dao.PetDao;
import cn.maxhou.sl1.entity.Pet;
import cn.maxhou.sl1.service.PetService;
import cn.maxhou.sl2.factory.PetDaoFactpry;

public class PetServiceImpl implements PetService {
    //通过指定的名称获取PetDao实例
    PetDao petDao = PetDaoFactpry.getInstance(PetDaoFactpry.defaultBeanName);
    @Override
    public boolean save(Pet pet) {
        return petDao.insert(pet)>0;
    }
}
